package com.wondersgroup.fjzlpt.yyzyzx.controller.view.yyzygl;

import com.alibaba.fastjson.JSONObject;
import com.quick.framework.util.QuickPrincipalUtils;
import com.wondersgroup.fjzlpt.yyzyzx.util.ControllerUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * 床位预约
 * <p>
 * <p>
 * Created by sanma on 2017/8/2.
 */
@Controller
@RequestMapping("/cwyygl")
public class CwyyglController {

    /**
     * 床位预约管理列表查询页面
     * @param request
     * @return
     */
    @RequestMapping("/index.html")
    public String index(HttpServletRequest request) {
        JSONObject requestData = ControllerUtils.getRequestData(request);
        request.setAttribute("requestData", requestData);
        String xzqhdm = QuickPrincipalUtils.getXzqhdm(request);
        request.setAttribute("xzqhdm" , xzqhdm );
        return "yyzygl/cwgl/cwyygl/index";
    }

    /**
     * 新增/修改 床位预约管理
     * @param request
     * @return
     */
    @RequestMapping("/manager.html")
    public String manager(HttpServletRequest request) {
        JSONObject requestData = ControllerUtils.getRequestData(request);
        request.setAttribute("requestData", requestData);
        return "yyzygl/cwgl/cwyygl/manager";
    }

    /**
     * 通过Excel导入数据
     * @param request
     * @return
     */
    @RequestMapping("/importExcel.html")
    public String importExcel(HttpServletRequest request) {
        return "yyzygl/cwgl/cwyygl/importExcel";
    }
}
